﻿#ifndef INSTRUCTIONTHERMOSTATTEMPERATURERATE
#define INSTRUCTIONTHERMOSTATTEMPERATURERATE

#include "ScriptInstruction.h"

class InstructionThermostatTemperatureRate :public ScriptInstruction
{
  Q_OBJECT
private://property
  float temperatureRate = 0;
private:
  static const int byteArraySize=sizeof (temperatureRate);//除去指令类型标识符后的数据大小
public:
  explicit InstructionThermostatTemperatureRate();
  InstructionThermostatTemperatureRate(InstructionThermostatTemperatureRate const& instructionThermostatTemperatureRate);
  InstructionThermostatTemperatureRate& operator=(InstructionThermostatTemperatureRate const & instructionThermostatTemperatureRate);
  virtual ~InstructionThermostatTemperatureRate();
public:
  virtual void run()override;
  virtual QString toString()override;
  virtual QByteArray toByteArray() override;
  static ScriptInstruction* fromByteArray1(char * const src,int size,int * offset);
public://geter and seter
  float getTemperatureRate();
  InstructionThermostatTemperatureRate* setTemperatureRate(float temperatureRate);
};
#endif
